package main

import (
	"gin_jwt/config"
	"gin_jwt/midd"
	"net/http"

	"github.com/gin-gonic/gin"
)

func main() {
	tk := midd.Token_Encry(config.User_Input)
	jm := midd.Token_Decrypt(tk)

	e := gin.Default()
	e.GET("/", func(cont *gin.Context) {
		data := gin.H{
			"原文:":    config.User_Input,
			"Jwt加密:": tk,
			"解密：":    jm,
		}
		cont.JSON(http.StatusOK, data)
	})
	e.Run()
}
